home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-02-02 | 1.1 KB | 38 lines | [TEXT/R*ch] |
- # Comment out all lines.
- s/^/;/
- s/^;[ ]*$//
- # Change brackets to parens.
- s/\[ /(/g
- s/ \]/)/g
- s/\[/(/g
- s/\]/)/g
- # Convert the first line to a game-module form.
- /Xconq/s/^;Xconq . [+-]* \(.*\)$/(game-module "???"\
- (blurb "\1")\
- )\
- /
- # Convert the period name to a game title.
- /period/s/;\(.*\) period-name/(game-module (title \1))/
- # Convert utype forms to unit-type forms.
- /utype/s/;"\(.\)" "\(.*\)" "\(.*\)" utype/(unit-type \1 (name "\2") (char "\1")\
- (help "\3"))/
- # Convert resource type decls to material-type forms.
- /rtype/s/;"\(.\)" "\(.*\)" "\(.*\)" rtype/(material-type |\2| (help "\3"))/
- # Convert terrain types similarly.
- /ttype/s/;"\(.\)" "\(.*\)" "\(.*\)" ttype/(terrain-type |\2| (char "\1") (color "\3"))/
-
- /icon-name/s/;\(.*\) \(.*\) icon-name[ ]*$/(add \2 image-name \1)/
- # Convert variable definitions.
- /define/s/;\(.*\) "\(.*\)" define/(define \2 \1)/
-
- # Add empty game-module properties that usually go at the end.
- $a\
- (game-module (instructions (\
- \ \ )))\
- (game-module (notes (\
- \ \ )))\
- (game-module (design-notes (\
- \ \ )))
- # Remove the end-of-period marker.
- /^;[ ]*end[ ]*$/d
-